class @AdminAuthorEditModel extends Backbone.Model
    
    defaults:
        AuthorId: 0
        FirstName: ''
        LastName: ''
        MiddleName: ''
        SuccessMessage: ''

    url: ->
        url = SiteMap.Admin.Authors.Edit
        url += "?authorId=" + @attributes.AuthorId
        return encodeURI(url)
    
    parse: (response) ->
        return {
            FirstName: response.FirstName
            LastName: response.LastName
            MiddleName: response.MiddleName
            SuccessMessage: response.SuccessMessage
        }